package base

import "gorm.io/gorm"

// 存放公共结构属性
type SortColumn struct {
	Sort int `json:"sort" gorm:"column:sort;not null;default:0"`
}

type IDColumn struct {
	ID uint `json:"id" gorm:"primaryKey;autoIncrement;not null"`
}

type TimeColumn struct {
	CreateTime int `json:"create_time" gorm:"autoCreateTime:milli;not null;default:0"`
	UpdateTime int `json:"update_time" gorm:"autoUpdateTime:milli;not null;default:0"`
}

type DeleteColumn struct {
	DeletedAt gorm.DeletedAt `gorm:"index"`
}

type BaseColumn struct {
	IDColumn
	TimeColumn
	gorm.DeletedAt
}
